<?php
$checksum = crc32("http://aiyooyoo.com/index.php/category/suanfa/2/");
$a=sprintf("%u", $checksum);
echo $a,"\n";
function base62($x){
    $stack=array();
	$show='';
	while($x>0){
		$s= $x%62;
		if ($s>35) {
			$s= chr($s+61);
			}elseif ($s>9&&$s<=35){
				$s=chr($s+55);
            }
            $stack[]=$s;
            $x=floor($x/62);
        }
    var_dump($stack);
    while(count($stack)>0){
        $show.=array_pop($stack);
    }
	return $show;
}
function urlShort($url){
	$url=crc32($url);
	$result=sprintf("%u",$url);
	return base62($result);
}


echo urlShort("http://aiyooyoo.com/index.php/category/suanfa/2/"),"\n";
